import java.util.Calendar;
import java.util.Date;
import java.util.Enumeration;
import java.util.GregorianCalendar;

import javax.servlet.http.HttpServletRequest;

public class OrderBean extends CommonBean {
	private static final long serialVersionUID = 1L;
	
	GregorianCalendar calendar = new GregorianCalendar();

	public OrderBean() {
		System.out.println("OrderBean()");
		
		calendar.add(Calendar.HOUR, 1);
		
		Date date = calendar.getTime();
		
		this.put("delivery", date.toString());
	}
	
   @SuppressWarnings("unchecked")
   public void populate(HttpServletRequest request)
   {
     System.out.println("OrderBean.populate()");
     Enumeration enumeration = request.getParameterNames();
     if (enumeration != null)
     {
       while (enumeration.hasMoreElements())
       {
         String paramName = (String)enumeration.nextElement();
         String paramValue = request.getParameter(paramName);
         paramValue = paramValue.trim();
         put(paramName, paramValue);
       }
     }
     System.out.println("OrderBean.populate(): "+this);
   }
   

	
   public String toString() {
	   return super.toString();
   }
}